<template>
  <VPage>
    <VTable ref="tableRef" v-bind="tableOptions"><template #toolbar_btns></template></VTable>
  </VPage>
</template>
  
<script setup lang="jsx" name="Account">
import api from './api'

const tableRef = ref()
// 查询
const query = () => {
  tableRef?.value.query()
}

// 列表配置
const tableOptions = reactive({
  showHeaderOverflow: false,
  columns: [
    { title: '供应商', field: 'supplier_name', minWidth: 140, slots: {
      default: ({row}) => <VText value={row.supplier_name} line={2} />
    } },
    { title: '采购员', field: 'purchase_user_name', minWidth: 100 },
    { title: '支付宝待付款', field: 'alipay_wait_payment_price', minWidth: 80 },
    { title: '诚E赊待付款', field: 'credit_wait_payment_price', minWidth: 80 },
    { title: '跨境宝待付款', field: 'cross_wait_payment_price', minWidth: 80},
    { title: '阿里账期待还款', field: 'period_wait_repay_price', minWidth: 80 },
    { title: '银行转账待付款', field: 'bank_wait_payment_price', minWidth: 80 },
    { title: '账期待付款', field: 'period_wait_payment_price', minWidth: 80 },
    { title: '付款单待审核', field: 'payment_wait_audit_price', minWidth: 80 },
    { title: '退款待确认', field: 'refund_wait_confirm_price', minWidth: 80 },
    { title: '冲账待审核', field: 'strike_wait_audit_price', minWidth: 80 },
    { title: '发票待审核', field: 'invoice_wait_audit_price', minWidth: 80 },
  ],
  proxyConfig: {
    autoLoad: false,
    ajax: {
      query: ({ page, form }) => api.query({ ...form, ...page })
    }
  }
})
</script>
  